﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CodeCamp.Models.Presenters.PresentersDetailsViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
  <%= Html.Encode( Model.EventDisplayName ) %> | Presenter profile for <%= Html.Encode(Model.Name) %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  
  <h1 class="title">Presenter Profile</h1>
  <p>&nbsp;</p>
  <h2><%= Html.Encode(Model.Name) %></h2>

  <% if ( Model.IsUserAuthorizedToEdit )
     { %>
       <div>
        <%= Html.ActionLink( "Edit", "Edit", new { id = Model.PresenterId } ) %>
       </div>
  <% } %>
  
  <div>
    <% if ( !string.IsNullOrEmpty( Model.TwitterName ) )
       { %>
          Twitter:
          <a href="http://twitter.com/<%= Html.Encode(Model.TwitterName) %>" target="_blank"><%= Html.Encode( Model.TwitterName )%></a>
    <% } %>

    <% if ( !string.IsNullOrEmpty( Model.BlogUrl ) ) 
        { %>
        &nbsp; | &nbsp; <span class="presenter-twittername"><a href="<%= Html.Encode( Model.BlogUrl ) %>">Blog</a></span>
    <% } %>

    <% if ( !string.IsNullOrEmpty( Model.WebsiteUrl ) ) 
        { %>
        &nbsp; | &nbsp; <span class="presenter-twittername"><a href="<%= Html.Encode( Model.WebsiteUrl ) %>">Website</a></span>
    <% } %>
  </div>
  <% if ( !string.IsNullOrEmpty( Model.SpeakerRateSpeakerUrl ) )
     { %>
      <div>
        SpeakerRate Speaker URL:
        <a href="<%= Html.Encode( Model.SpeakerRateSpeakerUrl ) %>" target="_blank"><%= Html.Encode( Model.SpeakerRateSpeakerUrl )%></a>
      </div>
  <% } %>

  <div>
    Biography:
    <%= Html.Encode(Model.Biography) %>
  </div>
  <h3>Sessions</h3>
  <ul>
    <% foreach ( var session in Model.Sessions )
       { %>
          <li class="presenterSession">
            <%= Html.ActionLink( session.Title, "Details", "Sessions", new { id = session.SessionId }, null ) %>
          </li>
    <% } %>
  </ul>
</asp:Content>
